import urllib.request
#from urllib import request
url1 = "https://tieba.baidu.com/f?kw=%E6%9D%8E%E6%AF%85&pn=0"
url2 = "/p/6388631773"
print(urllib.request.urljoin(url1,url2))


url3 = "https://list.jd.com/list.html?cat=1713,3258,3297&tid=3297&page=1&sort=sort_rank_asc&trans=1&JL=6_0_0#J_main"
url4 = "//img12.360buyimg.com/n7/jfs/t1/93796/39/4004/223706/5de475c8Ecb23b4cd/752ca48a5163d316.jpg"
url5 = None
url6 = ''
print(urllib.request.urljoin(url3,url4))
print(urllib.request.urljoin(url3,url5))
print(urllib.request.urljoin(url3,url6))